package Entidades;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name="Empleado")
public class Empleado implements Serializable {
	private static final long serialVersionUID = 1L;
	
	@Id @GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="nroEmp")
	private int nroEmp;
	
	@Column(nullable=false, length=8, name="dni")
	private String dni;

	@Column(nullable=false,  length=30, name="nombre")
	private String nombre;
	
	@Column(nullable=false, length=20, name="apellido")
	private String apellido;
	
	@Column(nullable=true, length=50, name="domicilio")
	private String domicilio;
	
	@Column(nullable=true, length=10, name="telefono")
	private String telefono;
	
	@OneToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="idRol")
	private Rol rol;
}
